//
//  WBFristUserInforModel.swift
//  weibo
//
//  Created by  郭航 on 16/6/29.
//  Copyright © 2016年 郭航. All rights reserved.
//

import UIKit

class WBFristUserInforModel: NSObject {

    var id: Int64 = 0
    
    var screen_name: String?
    
    var profile_image_url: String?
    
    var verified_type: Int = -1 {
        didSet {
            switch verified_type {
            case 0:
                verifiedImage = UIImage(named: "avatar_vip")
                
            case 2,3,5:
                verifiedImage = UIImage(named: "avatar_enterprise_vip")
                
            case 4:
                verifiedImage = UIImage(named: "avatar_vgirl")
                
            case 220:
                verifiedImage = UIImage(named: "avatar_grassroot")
                
            default:
                verifiedImage = nil
            }
        }
    }
    
    var verifiedImage: UIImage?
    
    var mbrank: Int = 0 {
        didSet {
            if mbrank > 0 && mbrank < 7 {
                mbrankImage = UIImage(named: "common_icon_membership_level\(mbrank)")
            } else {
                mbrankImage = UIImage(named: "common_icon_membership_expired")
            }
        }
    }
    
    var mbrankImage: UIImage?
    
    init(dic: [String : AnyObject]) {
        super.init()
        
        setValuesForKeysWithDictionary(dic)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
}
